package org.ecshop;

import javax.annotation.Resource;

import org.ecshop.models.Goods;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import will.icecoffe.core.SimpleDataAccessService;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath*:applicationContext.xml", "classpath*:icecoffeContext.xml"})
public class FirstTestCase {

	//@Resource(name="testDataService")
	@Autowired
	private SimpleDataAccessService<Goods> das;
	
	@Test
	public void testFinder() throws Exception {
		//Goods g = das.find("hql", "allGoods").get(0);
		System.out.println(das.find("hql", "findCollectedGoodsByUserId", 7).size());
	}
	
}
